const labelService = require("../service/label.service")

class LabelController {
    async create(ctx, next) {
        const { content } = ctx.request.body
        const result = await labelService.create(content)
        ctx.body = result

    }
    async list(ctx, next) {
        const { offset, limit } = ctx.query
        const result = await labelService.getList(offset, limit)
        ctx.body = result
    }
    async tableList(ctx, next) {
        const { momentId } = ctx.params
        const result = await labelService.getListByMomentId(momentId)
        ctx.body = result
    }
}

module.exports = new LabelController()